<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css下拉选择2</title>
  <link rel="stylesheet" href="global.css">
  <style>
    /* 技巧：linear-gradient 水很深 */
    :root {
      --glass: rgba(255, 255, 255, 0.2);
      --glass-icon: rgba(255, 255, 255, 0.3);
      --gradient: linear-gradient(35deg, red, purple);
      --option: #320a28;
      height: 100%;
    }

    body {
      background: var(--gradient);
    }

    select {
      /* 重置样式 */
      appearance: none;
      border: 0;
      outline: 0;
      font: inherit;

      width: 20em;
      height: 3em;
      padding: 0 4em 0 1em;
      color: white;
      border-radius: 0.25em;
      /* 找不到可访问合适图标 */
      background: url(#) no-repeat right 0.8em center / 1.4em,
        linear-gradient(to left, var(--glass-icon) 3em, var(--glass) 3em);
      box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.2);
      /* background-color: rgba(255, 255, 255, 0.2); */
      backdrop-filter: blur(2px);
      cursor: pointer;
      position: relative;
    }

    select::after {
      display: block;
      width: 200px;
      height: 200px;
      padding: 1em;
      background-color: red;
      content: '\25BC';
      position: absolute;
      top: 0;
      right: 0;

    }

    select option {
      color: inherit;
      background-color: var(--option)
    }

    select :focus {
      outline: none;
    }

    /* 移除 ie 箭头 */
    select ::-ms-expand {
      display: none;
    }
  </style>
</head>

<body>
  <header>
    <a href="https://codepen.io/raubaca/pen/bGWmZje">出自：https://codepen.io/raubaca/pen/bGWmZje</a>
  </header>
  <select>
    <option selected value="0">Pure CSS Select</option>
    <option value="1">No Wrapper</option>
    <option value="2">No JS</option>
    <option value="3">Nice!</option>
  </select>
</body>